<nav class="navbar navbar-default" role="navigation">
    <div class="container">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle" ng-click="vm.toggleNavbar()">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand logo" href="#/" ng-click="vm.collapseNavbar()">
                <div style="float:left;">
                    <span ng-if="run" class="run"></span>
                    <span ng-if="test" class="test"></span>
                    <span ng-if="dev" class="dev"></span>
                </div>
                <div style="float: left;line-height: 40px">
                    <span>{{vm.navbarTitle}}</span>
                    <!--<span ng-if="test" data-translate="global.title-test">Logcenter</span>-->
                    <!--<span ng-if="dev" data-translate="global.title-dev">Logcenter</span>-->
                    <span class="navbar-version">v{{VERSION}}</span>
                </div>
                <div style="clear: both;"></div>
            </a>
        </div>
        <div class="navbar-collapse" uib-collapse="vm.isNavbarCollapsed" ng-switch="vm.isAuthenticated()">
            <ul class="nav navbar-nav navbar-right">
                <li ui-sref-active="active">
                    <a ui-sref="home" ng-click="vm.collapseNavbar()">
                        <span class="glyphicon glyphicon-home"></span>
                        <span class="hidden-sm" data-translate="global.menu.home">Home</span>
                    </a>
                </li>
                <li ng-class="{active: vm.$state.includes('admin')}" ng-switch-when="true" has-authority="" uib-dropdown
                    class="dropdown pointer">

                    <a class="dropdown-toggle" uib-dropdown-toggle href="" id="admin-log">
                        <span>
                            <span class="glyphicon glyphicon-search"></span>
                            <span class="hidden-sm">日志检索</span>
                            <b class="caret"></b>
                        </span>
                    </a>
                    <ul class="dropdown-menu" uib-dropdown-menu>
                        <li>
                            <a ui-sref="svcoperation" ng-click="vm.collapseNavbar()">
                                <span class="glyphicon glyphicon-search"></span>
                                <span>全文检索</span>
                            </a>
                        </li>
                        <li>
                            <a ui-sref="svcdebug" ng-click="vm.collapseNavbar()">
                                <span class="glyphicon glyphicon-search"></span>
                                <span>按服务名检索</span>
                            </a>
                        </li>
                        <li>
                            <a ui-sref="filenamesearch" ng-click="vm.collapseNavbar()">
                                <span class="glyphicon glyphicon-search"></span>
                                <span>文件名检索</span>
                            </a>
                        </li>
                        <li>
                            <a ui-sref="commlog" ng-click="vm.collapseNavbar()">
                                <span class="glyphicon glyphicon-resize-horizontal"></span>
                                <span>通讯链路跟踪</span>
                            </a>
                        </li>
                        <li>
                            <a ui-sref="sql" ng-click="vm.collapseNavbar()">
                                <span class="glyphicon glyphicon-dashboard"></span>
                                <span>异常日志监控</span>
                            </a>
                        </li>
                        <li>
                            <a ui-sref="framelog" ng-click="vm.collapseNavbar()">
                                <span class="glyphicon glyphicon-stats"></span>
                                <span>平台日志分析</span>
                            </a>
                        </li>

                        <li>
                            <a ui-sref="simpleSearch" ng-click="vm.collapseNavbar()">
                                <span class="glyphicon glyphicon-search"></span>
                                <span>简单查询</span>
                            </a>
                        </li>
                        <li>
                            <a ui-sref="slowSvc" ng-click="vm.collapseNavbar()">
                                <span class="glyphicon glyphicon-search"></span>
                                <span>异常慢服务日志监控</span>
                            </a>
                        </li>
                        <!--<li >-->
                        <!--<a ui-sref="idklog" ng-click="vm.collapseNavbar()">-->
                        <!--<span class="glyphicon glyphicon-stats"></span>-->
                        <!--<span>IDK日志分析</span>-->
                        <!--</a>-->
                        <!--</li>-->
                        <!--<li >-->
                        <!--<a ui-sref="deploylog" ng-click="vm.collapseNavbar()">-->
                        <!--<span class="glyphicon glyphicon-eye-open"></span>-->
                        <!--<span>程序发布监控</span>-->
                        <!--</a>-->
                        <!--</li>-->
                        <!--<li >-->
                        <!--<a ui-sref="levelprotection" ng-click="vm.collapseNavbar()">-->
                        <!--<span class="glyphicon glyphicon-flash"></span>-->
                        <!--<span>等保三级查询</span>-->
                        <!--</a>-->
                        <!--</li>-->
                    </ul>

                </li>
                <li ng-class="{active: vm.$state.includes('admin')}" ng-switch-when="true" has-authority="ROLE_ADMIN"
                    uib-dropdown class="dropdown pointer">

                    <a class="dropdown-toggle" uib-dropdown-toggle href="" id="admin-config">
                        <span>
                            <span class="glyphicon glyphicon-cog"></span>
                            <span class="hidden-sm">日志管理</span>
                            <b class="caret"></b>
                        </span>
                    </a>
                    <ul class="dropdown-menu" uib-dropdown-menu>
                        <li>
                            <a ui-sref="esstatus" ng-click="vm.collapseNavbar()">
                                <span class="glyphicon glyphicon-cog"></span>
                                <span>集群状态查看</span>
                            </a>
                        </li>
                        <li>
                            <a ui-sref="esindex" ng-click="vm.collapseNavbar()">
                                <span class="glyphicon glyphicon-indent-right"></span>
                                <span>集群索引查看</span>
                            </a>
                        </li>
                        <li>
                            <a ui-sref="esclusterconfig" ng-click="vm.collapseNavbar()">
                                <span class="glyphicon glyphicon-cog"></span>
                                <span>集群地址配置</span>
                            </a>
                        </li>
                        <li>
                            <a ui-sref="logarchive" ng-click="vm.collapseNavbar()">
                                <span class="glyphicon glyphicon-hdd"></span>
                                <span>日志归档配置</span>
                            </a>
                        </li>
                        <li>
                            <a ui-sref="partition" ng-click="vm.collapseNavbar()">
                                <span class="glyphicon glyphicon-hdd"></span>
                                <span>多基地分区配置</span>
                            </a>
                        </li>
                        <li>
                            <a ui-sref="filebeatConfig" ng-click="vm.collapseNavbar()">
                                <span class="glyphicon glyphicon-cog"></span>
                                <span>filebeat配置</span>
                            </a>
                        </li>
                    </ul>
                </li>
                <li  ng-if="isShowNav == 'true'" ng-class="{active: vm.$state.includes('admin')}"  ng-switch-when="true" has-any-authority="ROLE_ADMIN, ROLE_MANAGER"
                    uib-dropdown class="dropdown pointer">
                    <a class="dropdown-toggle" uib-dropdown-toggle href="" id="admin-logalert">
                        <span>
                            <span class="glyphicon glyphicon-alert"></span>
                            <span class="hidden-sm">报警管理</span>
                            <b class="caret"></b>
                        </span>
                    </a>
                    <ul  class="dropdown-menu" uib-dropdown-menu>
                        <li>
                            <a ui-sref="alertsub" ng-click="vm.collapseNavbar()">
                                <span class="glyphicon glyphicon-check"></span>
                                <span>报警订阅</span>
                            </a>
                        </li>
                        <li>
                            <a ui-sref="alertuser" ng-click="vm.collapseNavbar()">
                                <span class="glyphicon glyphicon-user"></span>
                                <span>报警用户信息维护</span>
                            </a>
                        </li>
                        <li>
                            <a ui-sref="alertmemo" ng-click="vm.collapseNavbar()">
                                <span class="glyphicon glyphicon-search"></span>
                                <span>报警履历查询</span>
                            </a>
                        </li>
                    </ul>
                </li>

                <li ng-class="{active: vm.$state.includes('admin')}" ng-switch-when="true" has-any-authority="ROLE_ADMIN, ROLE_MANAGER"
                    uib-dropdown class="dropdown pointer">

                    <a class="dropdown-toggle" uib-dropdown-toggle href="" id="admin-dashboard">
                        <span>
                            <span class="glyphicon glyphicon-eye-open"></span>
                            <span class="hidden-sm">大盘监控</span>
                            <b class="caret"></b>
                        </span>
                    </a>
                    <ul class="dropdown-menu" uib-dropdown-menu>
                        <li>
                            <a ui-sref="partitionDash" ng-click="vm.collapseNavbar()">
                                <span class="glyphicon glyphicon-eye-open"></span>
                                <span>分区监控</span>
                            </a>
                        </li>
                        <li>
                            <a ui-sref="platformDash" ng-click="vm.collapseNavbar()">
                                <span class="glyphicon glyphicon-eye-open"></span>
                                <span>平台监控</span>
                            </a>
                        </li>
                        <li>
                            <a ui-sref="transfercount" ng-click="vm.collapseNavbar()">
                                <span class="glyphicon glyphicon-stats"></span>
                                <span>调用统计</span>
                            </a>
                        </li>
                        <li>
                            <a ui-sref="questioncount" ng-click="vm.collapseNavbar()">
                                <span class="glyphicon glyphicon-stats"></span>
                                <span>问题统计</span>
                            </a>
                        </li>
                        <li ng-if="isShowNav == 'true'">
                            <a ui-sref="deploydash" ng-click="vm.collapseNavbar()">
                                <span class="glyphicon glyphicon-stats"></span>
                                <span>发布统计</span>
                            </a>
                        </li>


                        <li>
                            <a ui-sref="svcanalysis" ng-click="vm.collapseNavbar()">
                                <span class="glyphicon glyphicon-stats"></span>
                                <span>服务执行分析</span>
                            </a>
                        </li>
                    </ul>
                </li>
                <li ng-if="show && isShowNav == 'true' " ng-class="{active: vm.$state.includes('admin')}" ng-switch-when="true" has-authority=""
                    uib-dropdown class="dropdown pointer">

                    <a class="dropdown-toggle" uib-dropdown-toggle href="" id="admin-approve">
                        <span>
                            <span class="glyphicon glyphicon-th"></span>
                            <span class="hidden-sm">工作项</span>
                            <b class="caret"></b>
                        </span>
                    </a>
                    <ul class="dropdown-menu" uib-dropdown-menu>
                        <li>
                            <a ui-sref="deploy" ng-click="vm.collapseNavbar()">
                                <span class="glyphicon glyphicon-list-alt"></span>
                                <span>程序发布</span>
                            </a>
                        </li>
                    </ul>
                </li>
                <!-- jhipster-needle-add-element-to-menu - JHipster will add new menu items here -->
                <!--<li ng-class="{active: vm.$state.includes('entity')}" ng-switch-when="true" uib-dropdown class="dropdown pointer">-->
                <!--<a class="dropdown-toggle" uib-dropdown-toggle href="" id="entity-menu">-->
                <!--<span>-->
                <!--<span class="glyphicon glyphicon-th-list"></span>-->
                <!--<span class="hidden-sm" data-translate="global.menu.entities.main">-->
                <!--Entities-->
                <!--</span>-->
                <!--<b class="caret"></b>-->
                <!--</span>-->
                <!--</a>-->
                <!--<ul class="dropdown-menu" uib-dropdown-menu>-->
                <!--&lt;!&ndash; jhipster-needle-add-entity-to-menu - JHipster will add entities to the menu here &ndash;&gt;-->
                <!--</ul>-->
                <!--</li>-->
                <li ng-class="{active: vm.$state.includes('account')}" uib-dropdown class="dropdown pointer">
                    <a class="dropdown-toggle" uib-dropdown-toggle href="" id="account-menu">
                        <span>
                            <span class="glyphicon glyphicon-user"></span>
                            <span class="hidden-sm" data-translate="global.menu.account.main">
                                Account
                            </span>
                            <b class="caret"></b>
                        </span>
                    </a>
                    <ul class="dropdown-menu" uib-dropdown-menu>
                        <li ui-sref-active="active" ng-switch-when="true">
                            <a ui-sref="settings" ng-click="vm.collapseNavbar()">
                                <span class="glyphicon glyphicon-wrench"></span>&nbsp;
                                <span data-translate="global.menu.account.settings">Settings</span>
                            </a>
                        </li>
                        <li ui-sref-active="active" ng-switch-when="true">
                            <a ui-sref="password" ng-click="vm.collapseNavbar()">
                                <span class="glyphicon glyphicon-lock"></span>&nbsp;
                                <span data-translate="global.menu.account.password">Password</span>
                            </a>
                        </li>
                        <li ui-sref-active="active" ng-switch-when="true">
                            <a href="" ng-click="vm.logout()" id="logout">
                                <span class="glyphicon glyphicon-log-out"></span>&nbsp;
                                <span data-translate="global.menu.account.logout">Sign out</span>
                            </a>
                        </li>
                        <li ui-sref-active="active" ng-switch-when="false">
                            <a href="" ng-click="vm.login()" id="login">
                                <span class="glyphicon glyphicon-log-in"></span>&nbsp;
                                <span data-translate="global.menu.account.login">Sign in</span>
                            </a>
                        </li>
                        <li ui-sref-active="active" ng-switch-when="false">
                            <a ui-sref="register" ng-click="vm.collapseNavbar()">
                                <span class="glyphicon glyphicon-plus-sign"></span>&nbsp;
                                <span data-translate="global.menu.account.register">Register</span>
                            </a>
                        </li>
                    </ul>
                </li>
                <li ng-class="{active: vm.$state.includes('admin')}" ng-switch-when="true" has-authority="ROLE_ADMIN"
                    uib-dropdown class="dropdown pointer">
                    <a class="dropdown-toggle" uib-dropdown-toggle href="" id="admin-menu">
                        <span>
                            <span class="glyphicon glyphicon-tower"></span>
                            <span class="hidden-sm" data-translate="global.menu.admin.main">Administration</span>
                            <b class="caret"></b>
                        </span>
                    </a>
                    <ul class="dropdown-menu" uib-dropdown-menu>
                        <li ui-sref-active="active">
                            <a ui-sref="user-management" ng-click="vm.collapseNavbar()">
                                <span class="glyphicon glyphicon-user"></span>&nbsp;
                                <span data-translate="global.menu.admin.userManagement">User management</span>
                            </a>
                        </li>
                        <li ui-sref-active="active">
                            <a ui-sref="jhi-metrics" ng-click="vm.collapseNavbar()">
                                <span class="glyphicon glyphicon-dashboard"></span>&nbsp;
                                <span data-translate="global.menu.admin.metrics">Metrics</span>
                            </a>
                        </li>
                        <li ui-sref-active="active">
                            <a ui-sref="jhi-health" ng-click="vm.collapseNavbar()">
                                <span class="glyphicon glyphicon-heart"></span>&nbsp;
                                <span data-translate="global.menu.admin.health">Health</span>
                            </a>
                        </li>
                        <li ui-sref-active="active">
                            <a ui-sref="jhi-configuration" ng-click="vm.collapseNavbar()">
                                <span class="glyphicon glyphicon-list-alt"></span>&nbsp;
                                <span data-translate="global.menu.admin.configuration">Configuration</span>
                            </a>
                        </li>
                        <li ui-sref-active="active">
                            <a ui-sref="audits" ng-click="vm.collapseNavbar()">
                                <span class="glyphicon glyphicon-bell"></span>&nbsp;
                                <span data-translate="global.menu.admin.audits">Audits</span>
                            </a>
                        </li>
                        <li ui-sref-active="active">
                            <a ui-sref="logs" ng-click="vm.collapseNavbar()">
                                <span class="glyphicon glyphicon-tasks"></span>&nbsp;
                                <span data-translate="global.menu.admin.logs">Logs</span>
                            </a>
                        </li>
                        <li ng-show="vm.swaggerEnabled" ui-sref-active="active">
                            <a ui-sref="docs" ng-click="vm.collapseNavbar()">
                                <span class="glyphicon glyphicon-book"></span>&nbsp;
                                <span data-translate="global.menu.admin.apidocs">API</span>
                            </a>
                        </li>
                        <!-- jhipster-needle-add-element-to-admin-menu - JHipster will add entities to the admin menu here -->
                    </ul>
                </li>
                <!--<li ui-sref-active="active" uib-dropdown class="dropdown pointer" ng-controller="JhiLanguageController as languageVm">-->
                <!--<a class="dropdown-toggle" uib-dropdown-toggle href="" ng-if="languageVm.languages.length > 1">-->
                <!--<span>-->
                <!--<span class="glyphicon glyphicon-flag"></span>-->
                <!--<span class="hidden-sm" data-translate="global.menu.language">Language</span>-->
                <!--<b class="caret"></b>-->
                <!--</span>-->
                <!--</a>-->
                <!--<ul class="dropdown-menu" uib-dropdown-menu ng-if="languageVm.languages.length > 1">-->
                <!--<li active-menu="{{language}}" ng-repeat="language in languageVm.languages">-->
                <!--<a href="" ng-click="languageVm.changeLanguage(language);vm.collapseNavbar();">{{language | findLanguageFromKey}}</a>-->
                <!--</li>-->
                <!--</ul>-->
                <!--</li>-->
            </ul>
        </div>
    </div>
</nav>
